<?php 
include("include/connect.php");
$email = $_POST['email'];
$fname = $_POST['name'];
$lname = $_POST['lname'];
$phone = $_POST['phone'];
$pass = $_POST['pass'];
$res = mysqli_query($con,"select * from customer where emailid='".$email."'");
$count =  mysqli_num_rows($res);
if($count > 0){
	echo "exists";
}else{

	$res = mysqli_query($con,"insert into customer (`firstName`,`lastName`,`phoneno`,`emailid`,`password`)
	values('".$fname."','".$lname."','".$phone."','".$email."','".$pass."')");
	if(mysqli_insert_id($con)){
		echo "success";
	}
}
?>